package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PublicServiceContentMapper;
import com.ruoyi.system.domain.PublicServiceContent;
import com.ruoyi.system.service.IPublicServiceContentService;

/**
 * 查看内容Service业务层处理
 * 
 * @author coderChen
 * @date 2024-01-09
 */
@Service
public class PublicServiceContentServiceImpl implements IPublicServiceContentService 
{
    @Autowired
    private PublicServiceContentMapper publicServiceContentMapper;

    /**
     * 查询查看内容
     * 
     * @param id 查看内容主键
     * @return 查看内容
     */
    @Override
    public PublicServiceContent selectPublicServiceContentById(Long id)
    {
        return publicServiceContentMapper.selectPublicServiceContentById(id);
    }

    /**
     * 查询查看内容列表
     * 
     * @param publicServiceContent 查看内容
     * @return 查看内容
     */
    @Override
    public List<PublicServiceContent> selectPublicServiceContentList(PublicServiceContent publicServiceContent)
    {
        return publicServiceContentMapper.selectPublicServiceContentList(publicServiceContent);
    }

    /**
     * 新增查看内容
     * 
     * @param publicServiceContent 查看内容
     * @return 结果
     */
    @Override
    public int insertPublicServiceContent(PublicServiceContent publicServiceContent)
    {
        publicServiceContent.setCreateTime(DateUtils.getNowDate());
        return publicServiceContentMapper.insertPublicServiceContent(publicServiceContent);
    }

    /**
     * 修改查看内容
     * 
     * @param publicServiceContent 查看内容
     * @return 结果
     */
    @Override
    public int updatePublicServiceContent(PublicServiceContent publicServiceContent)
    {
        return publicServiceContentMapper.updatePublicServiceContent(publicServiceContent);
    }

    /**
     * 批量删除查看内容
     * 
     * @param ids 需要删除的查看内容主键
     * @return 结果
     */
    @Override
    public int deletePublicServiceContentByIds(Long[] ids)
    {
        return publicServiceContentMapper.deletePublicServiceContentByIds(ids);
    }

    /**
     * 删除查看内容信息
     * 
     * @param id 查看内容主键
     * @return 结果
     */
    @Override
    public int deletePublicServiceContentById(Long id)
    {
        return publicServiceContentMapper.deletePublicServiceContentById(id);
    }
}
